3.6 \(\int \frac{\cot ^2(x)}{a+a \csc (x)} \, dx\)

Optimal. Leaf size=15 \[ -\frac{x}{a}-\frac{\tanh ^{-1}(\cos (x))}{a} \]

[Out]

-(x/a) - ArcTanh[Cos[x]]/a

________________________________________________________________________________________

Rubi [A]  time = 0.0397653, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3888, 3770} \[ -\frac{x}{a}-\frac{\tanh ^{-1}(\cos (x))}{a} \]

Antiderivative was successfully verified.

[In]

Int[Cot[x]^2/(a + a*Csc[x]),x]

[Out]

-(x/a) - ArcTanh[Cos[x]]/a

Rule 3888

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Dist[a^(2*n
)/e^(2*n), Int[(e*Cot[c + d*x])^(m + 2*n)/(-a + b*Csc[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && E
qQ[a^2 - b^2, 0] && ILtQ[n, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{\cot ^2(x)}{a+a \csc (x)} \, dx &=\frac{\int (-a+a \csc (x)) \, dx}{a^2}\\ &=-\frac{x}{a}+\frac{\int \csc (x) \, dx}{a}\\ &=-\frac{x}{a}-\frac{\tanh ^{-1}(\cos (x))}{a}\\ \end{align*}

Mathematica [A]  time = 0.0432713, size = 30, normalized size = 2. \[ -\frac{x}{a}+\frac{\log \left (\sin \left (\frac{x}{2}\right )\right )}{a}-\frac{\log \left (\cos \left (\frac{x}{2}\right )\right )}{a} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[x]^2/(a + a*Csc[x]),x]

[Out]

-(x/a) - Log[Cos[x/2]]/a + Log[Sin[x/2]]/a

________________________________________________________________________________________

Maple [A]  time = 0.049, size = 21, normalized size = 1.4 \begin{align*} -2\,{\frac{\arctan \left ( \tan \left ( x/2 \right ) \right ) }{a}}+{\frac{1}{a}\ln \left ( \tan \left ({\frac{x}{2}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(x)^2/(a+a*csc(x)),x)

[Out]

-2/a*arctan(tan(1/2*x))+1/a*ln(tan(1/2*x))

________________________________________________________________________________________

Maxima [B]  time = 1.46531, size = 41, normalized size = 2.73 \begin{align*} -\frac{2 \, \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a} + \frac{\log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^2/(a+a*csc(x)),x, algorithm="maxima")

[Out]

-2*arctan(sin(x)/(cos(x) + 1))/a + log(sin(x)/(cos(x) + 1))/a

________________________________________________________________________________________

Fricas [A]  time = 0.496634, size = 85, normalized size = 5.67 \begin{align*} -\frac{2 \, x + \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) - \log \left (-\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right )}{2 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^2/(a+a*csc(x)),x, algorithm="fricas")

[Out]

-1/2*(2*x + log(1/2*cos(x) + 1/2) - log(-1/2*cos(x) + 1/2))/a

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\cot ^{2}{\left (x \right )}}{\csc{\left (x \right )} + 1}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)**2/(a+a*csc(x)),x)

[Out]

Integral(cot(x)**2/(csc(x) + 1), x)/a

________________________________________________________________________________________

Giac [A]  time = 1.31193, size = 23, normalized size = 1.53 \begin{align*} -\frac{x}{a} + \frac{\log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^2/(a+a*csc(x)),x, algorithm="giac")

[Out]

-x/a + log(abs(tan(1/2*x)))/a